package com.sunyifeng.ch25;

public class ComputerPartVisitorImpl implements ComputerPartVisitor {

    @Override
    public void visit(ComputerImpl computer) {
        System.out.println("Displaying Computer.");
    }

    @Override
    public void visit(MouseImpl mouse) {
        System.out.println("Displaying Mouse.");
    }

    @Override
    public void visit(KeyboardImpl keyboard) {
        System.out.println("Displaying Keyboard.");
    }

    @Override
    public void visit(MonitorImpl monitor) {
        System.out.println("Displaying Monitor.");
    }
}